3.113 \(\int \frac{4+x^2+3 x^4+5 x^6}{(3+2 x^2+x^4)^2} \, dx\)

Optimal. Leaf size=224 \[ \frac{25 x \left (1-x^2\right )}{24 \left (x^4+2 x^2+3\right )}+\frac{1}{96} \sqrt{\frac{1}{6} \left (11567+12897 \sqrt{3}\right )} \log \left (x^2-\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )-\frac{1}{96} \sqrt{\frac{1}{6} \left (11567+12897 \sqrt{3}\right )} \log \left (x^2+\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )-\frac{1}{48} \sqrt{\frac{1}{6} \left (12897 \sqrt{3}-11567\right )} \tan ^{-1}\left (\frac{\sqrt{2 \left (\sqrt{3}-1\right )}-2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )+\frac{1}{48} \sqrt{\frac{1}{6} \left (12897 \sqrt{3}-11567\right )} \tan ^{-1}\left (\frac{2 x+\sqrt{2 \left (\sqrt{3}-1\right )}}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right ) \]

[Out]

(25*x*(1 - x^2))/(24*(3 + 2*x^2 + x^4)) - (Sqrt[(-11567 + 12897*Sqrt[3])/6]*ArcTan[(Sqrt[2*(-1 + Sqrt[3])] - 2
*x)/Sqrt[2*(1 + Sqrt[3])]])/48 + (Sqrt[(-11567 + 12897*Sqrt[3])/6]*ArcTan[(Sqrt[2*(-1 + Sqrt[3])] + 2*x)/Sqrt[
2*(1 + Sqrt[3])]])/48 + (Sqrt[(11567 + 12897*Sqrt[3])/6]*Log[Sqrt[3] - Sqrt[2*(-1 + Sqrt[3])]*x + x^2])/96 - (
Sqrt[(11567 + 12897*Sqrt[3])/6]*Log[Sqrt[3] + Sqrt[2*(-1 + Sqrt[3])]*x + x^2])/96

________________________________________________________________________________________

Rubi [A]  time = 0.215101, antiderivative size = 224, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {1678, 1169, 634, 618, 204, 628} \[ \frac{25 x \left (1-x^2\right )}{24 \left (x^4+2 x^2+3\right )}+\frac{1}{96} \sqrt{\frac{1}{6} \left (11567+12897 \sqrt{3}\right )} \log \left (x^2-\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )-\frac{1}{96} \sqrt{\frac{1}{6} \left (11567+12897 \sqrt{3}\right )} \log \left (x^2+\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )-\frac{1}{48} \sqrt{\frac{1}{6} \left (12897 \sqrt{3}-11567\right )} \tan ^{-1}\left (\frac{\sqrt{2 \left (\sqrt{3}-1\right )}-2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )+\frac{1}{48} \sqrt{\frac{1}{6} \left (12897 \sqrt{3}-11567\right )} \tan ^{-1}\left (\frac{2 x+\sqrt{2 \left (\sqrt{3}-1\right )}}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(4 + x^2 + 3*x^4 + 5*x^6)/(3 + 2*x^2 + x^4)^2,x]

[Out]

(25*x*(1 - x^2))/(24*(3 + 2*x^2 + x^4)) - (Sqrt[(-11567 + 12897*Sqrt[3])/6]*ArcTan[(Sqrt[2*(-1 + Sqrt[3])] - 2
*x)/Sqrt[2*(1 + Sqrt[3])]])/48 + (Sqrt[(-11567 + 12897*Sqrt[3])/6]*ArcTan[(Sqrt[2*(-1 + Sqrt[3])] + 2*x)/Sqrt[
2*(1 + Sqrt[3])]])/48 + (Sqrt[(11567 + 12897*Sqrt[3])/6]*Log[Sqrt[3] - Sqrt[2*(-1 + Sqrt[3])]*x + x^2])/96 - (
Sqrt[(11567 + 12897*Sqrt[3])/6]*Log[Sqrt[3] + Sqrt[2*(-1 + Sqrt[3])]*x + x^2])/96

Rule 1678

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> With[{d = Coeff[PolynomialRemainder[Pq, a +
b*x^2 + c*x^4, x], x, 0], e = Coeff[PolynomialRemainder[Pq, a + b*x^2 + c*x^4, x], x, 2]}, Simp[(x*(a + b*x^2
+ c*x^4)^(p + 1)*(a*b*e - d*(b^2 - 2*a*c) - c*(b*d - 2*a*e)*x^2))/(2*a*(p + 1)*(b^2 - 4*a*c)), x] + Dist[1/(2*
a*(p + 1)*(b^2 - 4*a*c)), Int[(a + b*x^2 + c*x^4)^(p + 1)*ExpandToSum[2*a*(p + 1)*(b^2 - 4*a*c)*PolynomialQuot
ient[Pq, a + b*x^2 + c*x^4, x] + b^2*d*(2*p + 3) - 2*a*c*d*(4*p + 5) - a*b*e + c*(4*p + 7)*(b*d - 2*a*e)*x^2,
x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x^2] && Expon[Pq, x^2] > 1 && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 1169

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{4+x^2+3 x^4+5 x^6}{\left (3+2 x^2+x^4\right )^2} \, dx &=\frac{25 x \left (1-x^2\right )}{24 \left (3+2 x^2+x^4\right )}+\frac{1}{48} \int \frac{14+190 x^2}{3+2 x^2+x^4} \, dx\\ &=\frac{25 x \left (1-x^2\right )}{24 \left (3+2 x^2+x^4\right )}+\frac{\int \frac{14 \sqrt{2 \left (-1+\sqrt{3}\right )}-\left (14-190 \sqrt{3}\right ) x}{\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx}{96 \sqrt{6 \left (-1+\sqrt{3}\right )}}+\frac{\int \frac{14 \sqrt{2 \left (-1+\sqrt{3}\right )}+\left (14-190 \sqrt{3}\right ) x}{\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx}{96 \sqrt{6 \left (-1+\sqrt{3}\right )}}\\ &=\frac{25 x \left (1-x^2\right )}{24 \left (3+2 x^2+x^4\right )}+\frac{\left (7-95 \sqrt{3}\right ) \int \frac{\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x}{\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx}{96 \sqrt{6 \left (-1+\sqrt{3}\right )}}+\frac{1}{288} \left (285+7 \sqrt{3}\right ) \int \frac{1}{\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx+\frac{1}{288} \left (285+7 \sqrt{3}\right ) \int \frac{1}{\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx+\frac{\left (-7+95 \sqrt{3}\right ) \int \frac{-\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x}{\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx}{96 \sqrt{6 \left (-1+\sqrt{3}\right )}}\\ &=\frac{25 x \left (1-x^2\right )}{24 \left (3+2 x^2+x^4\right )}+\frac{1}{96} \sqrt{\frac{11567}{6}+\frac{4299 \sqrt{3}}{2}} \log \left (\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )-\frac{1}{96} \sqrt{\frac{11567}{6}+\frac{4299 \sqrt{3}}{2}} \log \left (\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )-\frac{1}{144} \left (285+7 \sqrt{3}\right ) \operatorname{Subst}\left (\int \frac{1}{-2 \left (1+\sqrt{3}\right )-x^2} \, dx,x,-\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x\right )-\frac{1}{144} \left (285+7 \sqrt{3}\right ) \operatorname{Subst}\left (\int \frac{1}{-2 \left (1+\sqrt{3}\right )-x^2} \, dx,x,\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x\right )\\ &=\frac{25 x \left (1-x^2\right )}{24 \left (3+2 x^2+x^4\right )}-\frac{1}{48} \sqrt{\frac{1}{6} \left (-11567+12897 \sqrt{3}\right )} \tan ^{-1}\left (\frac{\sqrt{2 \left (-1+\sqrt{3}\right )}-2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )+\frac{1}{48} \sqrt{\frac{1}{6} \left (-11567+12897 \sqrt{3}\right )} \tan ^{-1}\left (\frac{\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )+\frac{1}{96} \sqrt{\frac{11567}{6}+\frac{4299 \sqrt{3}}{2}} \log \left (\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )-\frac{1}{96} \sqrt{\frac{11567}{6}+\frac{4299 \sqrt{3}}{2}} \log \left (\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )\\ \end{align*}

Mathematica [C]  time = 0.273742, size = 115, normalized size = 0.51 \[ \frac{1}{48} \left (-\frac{50 x \left (x^2-1\right )}{x^4+2 x^2+3}+\frac{\left (95+44 i \sqrt{2}\right ) \tan ^{-1}\left (\frac{x}{\sqrt{1-i \sqrt{2}}}\right )}{\sqrt{1-i \sqrt{2}}}+\frac{\left (95-44 i \sqrt{2}\right ) \tan ^{-1}\left (\frac{x}{\sqrt{1+i \sqrt{2}}}\right )}{\sqrt{1+i \sqrt{2}}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(4 + x^2 + 3*x^4 + 5*x^6)/(3 + 2*x^2 + x^4)^2,x]

[Out]

((-50*x*(-1 + x^2))/(3 + 2*x^2 + x^4) + ((95 + (44*I)*Sqrt[2])*ArcTan[x/Sqrt[1 - I*Sqrt[2]]])/Sqrt[1 - I*Sqrt[
2]] + ((95 - (44*I)*Sqrt[2])*ArcTan[x/Sqrt[1 + I*Sqrt[2]]])/Sqrt[1 + I*Sqrt[2]])/48

________________________________________________________________________________________

Maple [B]  time = 0.02, size = 408, normalized size = 1.8 \begin{align*}{\frac{1}{{x}^{4}+2\,{x}^{2}+3} \left ( -{\frac{25\,{x}^{3}}{24}}+{\frac{25\,x}{24}} \right ) }+{\frac{139\,\ln \left ({x}^{2}+\sqrt{3}-x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}\sqrt{3}}{576}}+{\frac{11\,\ln \left ({x}^{2}+\sqrt{3}-x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}}{48}}+{\frac{ \left ( -278+278\,\sqrt{3} \right ) \sqrt{3}}{288\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x-\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }+{\frac{-22+22\,\sqrt{3}}{24\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x-\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }+{\frac{7\,\sqrt{3}}{72\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x-\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }-{\frac{139\,\ln \left ({x}^{2}+\sqrt{3}+x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}\sqrt{3}}{576}}-{\frac{11\,\ln \left ({x}^{2}+\sqrt{3}+x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}}{48}}+{\frac{ \left ( -278+278\,\sqrt{3} \right ) \sqrt{3}}{288\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x+\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }+{\frac{-22+22\,\sqrt{3}}{24\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x+\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }+{\frac{7\,\sqrt{3}}{72\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x+\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^6+3*x^4+x^2+4)/(x^4+2*x^2+3)^2,x)

[Out]

(-25/24*x^3+25/24*x)/(x^4+2*x^2+3)+139/576*ln(x^2+3^(1/2)-x*(-2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))^(1/2)*3^(1/2)
+11/48*ln(x^2+3^(1/2)-x*(-2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))^(1/2)+139/288/(2+2*3^(1/2))^(1/2)*arctan((2*x-(-2
+2*3^(1/2))^(1/2))/(2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))*3^(1/2)+11/24/(2+2*3^(1/2))^(1/2)*arctan((2*x-(-2+2*3^(
1/2))^(1/2))/(2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))+7/72/(2+2*3^(1/2))^(1/2)*arctan((2*x-(-2+2*3^(1/2))^(1/2))/(2
+2*3^(1/2))^(1/2))*3^(1/2)-139/576*ln(x^2+3^(1/2)+x*(-2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))^(1/2)*3^(1/2)-11/48*l
n(x^2+3^(1/2)+x*(-2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))^(1/2)+139/288/(2+2*3^(1/2))^(1/2)*arctan((2*x+(-2+2*3^(1/
2))^(1/2))/(2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))*3^(1/2)+11/24/(2+2*3^(1/2))^(1/2)*arctan((2*x+(-2+2*3^(1/2))^(1
/2))/(2+2*3^(1/2))^(1/2))*(-2+2*3^(1/2))+7/72/(2+2*3^(1/2))^(1/2)*arctan((2*x+(-2+2*3^(1/2))^(1/2))/(2+2*3^(1/
2))^(1/2))*3^(1/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{25 \,{\left (x^{3} - x\right )}}{24 \,{\left (x^{4} + 2 \, x^{2} + 3\right )}} + \frac{1}{24} \, \int \frac{95 \, x^{2} + 7}{x^{4} + 2 \, x^{2} + 3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^6+3*x^4+x^2+4)/(x^4+2*x^2+3)^2,x, algorithm="maxima")

[Out]

-25/24*(x^3 - x)/(x^4 + 2*x^2 + 3) + 1/24*integrate((95*x^2 + 7)/(x^4 + 2*x^2 + 3), x)

________________________________________________________________________________________

Fricas [B]  time = 1.72396, size = 1993, normalized size = 8.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^6+3*x^4+x^2+4)/(x^4+2*x^2+3)^2,x, algorithm="fricas")

[Out]

-1/33461214912*(54052*6160467^(1/4)*sqrt(2)*(x^4 + 2*x^2 + 3)*sqrt(-149179599*sqrt(3) + 498997827)*arctan(1/29
015889224422097862*sqrt(19364129)*6160467^(3/4)*sqrt(174277161*x^2 + 6160467^(1/4)*(7*sqrt(3)*x - 285*x)*sqrt(
-149179599*sqrt(3) + 498997827) + 174277161*sqrt(3))*(95*sqrt(3)*sqrt(2) - 7*sqrt(2))*sqrt(-149179599*sqrt(3)
+ 498997827) - 1/499478343426*6160467^(3/4)*(95*sqrt(3)*sqrt(2)*x - 7*sqrt(2)*x)*sqrt(-149179599*sqrt(3) + 498
997827) + 1/2*sqrt(3)*sqrt(2) - 1/2*sqrt(2)) + 54052*6160467^(1/4)*sqrt(2)*(x^4 + 2*x^2 + 3)*sqrt(-149179599*s
qrt(3) + 498997827)*arctan(1/29015889224422097862*sqrt(19364129)*6160467^(3/4)*sqrt(174277161*x^2 - 6160467^(1
/4)*(7*sqrt(3)*x - 285*x)*sqrt(-149179599*sqrt(3) + 498997827) + 174277161*sqrt(3))*(95*sqrt(3)*sqrt(2) - 7*sq
rt(2))*sqrt(-149179599*sqrt(3) + 498997827) - 1/499478343426*6160467^(3/4)*(95*sqrt(3)*sqrt(2)*x - 7*sqrt(2)*x
)*sqrt(-149179599*sqrt(3) + 498997827) - 1/2*sqrt(3)*sqrt(2) + 1/2*sqrt(2)) + 34855432200*x^3 - 6160467^(1/4)*
(11567*x^4 + 23134*x^2 + 12897*sqrt(3)*(x^4 + 2*x^2 + 3) + 34701)*sqrt(-149179599*sqrt(3) + 498997827)*log(174
277161*x^2 + 6160467^(1/4)*(7*sqrt(3)*x - 285*x)*sqrt(-149179599*sqrt(3) + 498997827) + 174277161*sqrt(3)) + 6
160467^(1/4)*(11567*x^4 + 23134*x^2 + 12897*sqrt(3)*(x^4 + 2*x^2 + 3) + 34701)*sqrt(-149179599*sqrt(3) + 49899
7827)*log(174277161*x^2 - 6160467^(1/4)*(7*sqrt(3)*x - 285*x)*sqrt(-149179599*sqrt(3) + 498997827) + 174277161
*sqrt(3)) - 34855432200*x)/(x^4 + 2*x^2 + 3)

________________________________________________________________________________________

Sympy [A]  time = 0.522246, size = 48, normalized size = 0.21 \begin{align*} - \frac{25 x^{3} - 25 x}{24 x^{4} + 48 x^{2} + 72} + \operatorname{RootSum}{\left (28311552 t^{4} - 23689216 t^{2} + 18481401, \left ( t \mapsto t \log{\left (\frac{40992768 t^{3}}{19364129} - \frac{48423104 t}{58092387} + x \right )} \right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**6+3*x**4+x**2+4)/(x**4+2*x**2+3)**2,x)

[Out]

-(25*x**3 - 25*x)/(24*x**4 + 48*x**2 + 72) + RootSum(28311552*_t**4 - 23689216*_t**2 + 18481401, Lambda(_t, _t
*log(40992768*_t**3/19364129 - 48423104*_t/58092387 + x)))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{5 \, x^{6} + 3 \, x^{4} + x^{2} + 4}{{\left (x^{4} + 2 \, x^{2} + 3\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^6+3*x^4+x^2+4)/(x^4+2*x^2+3)^2,x, algorithm="giac")

[Out]

integrate((5*x^6 + 3*x^4 + x^2 + 4)/(x^4 + 2*x^2 + 3)^2, x)